package com.itheima.demo2;

public interface Eatable {
    void eat(String food);
}
class Test{
    public static void main(String[] args) {
        useEatable(new Eatable() {
            @Override
            public void eat(String food) {

            }
        });
        useEatable((String food) -> {
            System.out.println("老八今天吃了"+food+"真难吃!");
        });
        EatableImpl eatable = new EatableImpl();
        eatable.eat("屎 ");
    }
    public static void useEatable(Eatable eatable){
        eatable.eat("秘制小汉堡");
    }

}
class EatableImpl implements Eatable{

    @Override
    public void eat(String food) {
        System.out.println("老八今天吃了"+food+"真难吃!");
    }
}
